!!! 5
%html{:lang => 'en'}
  %head
    %meta{:charset => 'utf-8'}
    %meta{:name => 'viewport', :content=>'width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no'}

    = include_stylesheet 'https://cdn.metroui.org.ua/v4/css/metro-all.min.css'
    = include_stylesheet 'kcoin'

    = include_javascript 'https://code.jquery.com/jquery-3.3.1.min.js'
    = include_javascript 'https://cdn.metroui.org.ua/v4/js/metro.min.js'

    %title
      KCoin

  %body.h-vh-100{:onselectstart=>"return false"}
    -# header
    .pos-fixed.fixed-top.app-bar-wrapper.z-top
      %header.container-fluid.pos-relative{"data-role"=>'appbar',"data-expand-point"=>"md"}

        -# left area: project logo
        %a.brand.no-hover.fg-white-hover.order-1
          %img{:src=>"icons/kcoin-log.png"}

        -# center area: menu bar
        %ul.app-bar-menu.order-3.order-md-2.text-center.mx-auto
          %li.divider.visible-fs.no-visible-ms.no-visible-md
          %li
            %a.fg-white-hover{:href => '/project'}
              = t('project_header_my_projects')
          %li.divider.visible-fs.no-visible-ms.no-visible-md
          %li
            %a.fg-white-hover{:href => '/user'}
              =t('project_header_user_center')
          %li.divider.visible-fs.no-visible-ms.no-visible-md
          %li
            %a.fg-white-hover{:href => '/exchange'}
              =t('project_header_exchange')
          %li.divider.visible-fs.no-visible-ms.no-visible-md
          %li
            %a.fg-white-hover{:href => 'https://github.com/kaiyuanshe/kcoin/tree/master/docs', :target=>'_blank'}
              =t('project_header_doc')
          %li.divider.visible-fs.no-visible-ms.no-visible-md
          %li
            %a.fg-white-hover{:href => 'https://github.com/kaiyuanshe/kcoin', :target=>'_blank'}
              =t('project_header_contribute')
          %li.divider.visible-fs.no-visible-ms.no-visible-md
          - if current_user.is_admin?
            %li
              %a.fg-white-hover{:href => '/admin'}
                =t('project_header_admin')
            %li.divider.visible-fs.no-visible-ms.no-visible-md
          %li
            %a.fg-white-hover.visible-fs.no-visible-ms.no-visible-md{:href=>'/auth/logout'}
              =t('project_logout')

        -# right area: user settings
        .app-bar-container.order-2.order-md-3.d-none-fs.d-flex-md
          - if current_user.is_authenticated?
            %span.app-bar-item
              = current_user.name
            .app-bar-container
              %a.app-bar-item.dropdown-toggle.marker-light.pl-1.pr-5{:href => '#'}
                %img.kcoin-avater{:src=>"#{current_user.avatar_url}"}
              %ul.v-menu.place-right{"data-role" => 'dropdown'}
                %li
                  %a{:href=>'/auth/logout'}
                    =t('project_logout')
          - else
            .app-bar-container
              %a.app-bar-item.marker-light.pl-1.pr-5{:href => '/auth/login'}
                =t('login_title')


    -# contents
    .container-fluid.px-0.pt-13{:style=>"overflow: auto;"}
      .container-fluid.bg-white.px-0.pb-10{:style=>"min-height: calc(100vh - 52px);overflow: auto;"}
        .bg-white.px-2.container#container
          = yield

      -# footer
      %footer.container-fluid.pos-absolute{:style=>'background-color:#333333;bottom:0;height:82px;'}
        .container.border-top.bd-default
          .row.pt-4{:style=>'text-align: center'}
            .cell-12
              %span
                © 2015-2018 开源社&nbsp;&nbsp;
              %span
                %a{:href=>'http://www.miibeian.gov.cn', :target=>'_blank'}
                  沪ICP备15046442号
                %a{:href=>'http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=31011202006189',:target=>'_blank'}
                  %img{:src=>'/icons/police.png'}
            .cell-12
              %span
                Powered by
                %img{:src=>'/icons/logo_huawei.png'}
              %span
                Huawei Cloud
